package com.woniu.supermarket.service.impl;

import com.woniu.supermarket.entity.PromotionDetail;
import com.woniu.supermarket.mapper.PromotionDetailMapper;
import com.woniu.supermarket.service.IPromotionDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PromotionDetailServiceImpl implements IPromotionDetailService {
    @Autowired
    PromotionDetailMapper promotionDetailMapper;

    @Override
    public void add(PromotionDetail pd) {
        promotionDetailMapper.insert(pd);
    }

    @Override
    public void deleteByPromotionId(int promotionId) {
        promotionDetailMapper.deleteBypromotionId(promotionId);
    }

    @Override
    public void removeByPromotionId(int id) {
        promotionDetailMapper.deleteBypromotionId(id);
    }
}
